package com.shisan.tingshu.account.mapper;

import com.shisan.tingshu.model.account.RechargeInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface RechargeInfoMapper extends BaseMapper<RechargeInfo> {

    /**
     * 修改零钱订单的状态
     * @param userId
     * @param orderNo
     * @return
     */
    @Update("update recharge_info set recharge_status='0902' WHERE user_id=#{userId} and recharge_status='0901' and order_no=#{orderNo}")
    int updateRechargeStatus(@Param("userId") String userId, @Param("orderNo") String orderNo);
}
